package com.domi.service.fallback;

import com.domi.bean.RestfulResponse;
import com.domi.service.BookService;
import org.springframework.stereotype.Component;

@Component
public class BookServiceFallback implements BookService {

    @Override
    public RestfulResponse categories() {
        return RestfulResponse.create(RestfulResponse.ResponseCode.SUCCESS, "[UnstableBookService Fallback]: categories");
    }

    @Override
    public RestfulResponse search(String qryStr) {
        return RestfulResponse.create(RestfulResponse.ResponseCode.SUCCESS, "[UnstableBookService Fallback]: search");
    }

    @Override
    public RestfulResponse category(String name) {
        return RestfulResponse.create(RestfulResponse.ResponseCode.SUCCESS, "[UnstableBookService Fallback]: category");
    }

    @Override
    public RestfulResponse flight() {
        return RestfulResponse.create(RestfulResponse.ResponseCode.SUCCESS, "[UnstableBookService Fallback]: flight");
    }

}